Build: Speed up Spark CI with parallel test execution#16357
Open
kevinjqliu wants to merge 5 commits into
Open
Conversation
e735e89 to
7350fea
Compare
b932d56 to
fdefde6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cuts Spark CI walltime from ~84 min to ~58 min (−31%) on
apache/icebergmain, validated empirically on this branch.Changes
Split matrix on
tests: [core, extensions].iceberg-spark,-extensions, and-runtimepreviously ran serially in one job. Splitting them into two concurrent jobs cuts the critical path from ~86 min (full suite) to ~58 min (longest single leg). Doubles the matrix from 10 → 20 jobs.-DtestParallelism=auto. Runs Gradle test workers in parallel. On ubuntu-24.04 (4 vCPU)autoresolves to 2 forks per JVM. Empirically this is the dominant per-job speedup; no test stability issues observed.max-parallel: 15→20. With 20 matrix cells, capping at 15 queues 5 jobs into a second wave (simulated ~87 min walltime — worse than baseline). 20 is the Apache infra policy ceiling and lets the full matrix run in a single wave.timeout-minutes: 90. Catches hangs (we hit one during this work) instead of burning the GitHub default 360 min. ~30 min headroom above the observed max job (60 min).Removed
jlumbroso/free-disk-space. ubuntu-24.04 starts with ~88 GB free; Spark CI never approaches that. Confirmed noENOSPCfailures across 20+ recent main runs. Saves ~1–2 min per job.Artifact name includes
matrix.tests;retention-days: 7. Required to avoid collisions onupload-artifact@v7with the split matrix. Short retention keeps storage bounded across 20 jobs × every PR push.Validation
Baseline = last 20 successful
spark-ci.ymlruns onapache/icebergmain(170 jobs sampled, pre-change config:max-parallel: 15, 10-cell matrix, full suite per job).This PR = run 25965870161 on head
47507cda.Critical path:
spark-tests (17, 4.0, 2.13, core)at 58.0 min. All 20 jobs started within 3 s of run start —max-parallel: 20runs the full matrix in a single wave with no queueing.